//
// Created by Win on 2016/8/31.
//

#include "test_es_comm.h"

#include <stdio.h>

#include "conntrack.h"
#include "frct_comm.h"

#include <es/es_core.h>

#include "apmtest_comm.h"

int test_es_create_ct(Conntrack **pp_st_conn, char *src_ip,
                       char *dst_ip, unsigned short src_port, unsigned short dst_port)
{
    Conntrack *p_st_conn = NULL;
    if (apmtest_create_ct(&p_st_conn, es_session_destroy, src_ip, dst_ip, src_port, dst_port) != FR_SUCC)
        goto error;

    *pp_st_conn = p_st_conn;

    return FR_SUCC;
    error:
    return FR_FAIL;
}

void test_es_destroy_ct(Conntrack **pp_st_conn)
{
    apmtest_destroy_ct(pp_st_conn);
}
